home *** CD-ROM | disk | FTP | other *** search
/ Magnum One / Magnum One (Mid-American Digital) (Disc Manufacturing).iso / d12 / uasm.arc / UASM-DOS.MAC < prev    next >
Text File  |  1986-03-15  |  6KB  |  122 lines

  1. ;                                MS-DOS Interrupt 21 service codes
  2. ;v1.10
  3. .RADIX 16
  4. ;START TABLE
  5. EXIT$       EQU   00    ; Terminate program 
  6. CIN$WE      EQU   01    ; Return keyboard char. in AL /Wait & Echo 
  7. COUT$       EQU   02    ; Display char. in DL
  8. AUXIN$W     EQU   03    ; Receive Serial char. in DL /Wait 
  9. AUXOUT$W    EQU   04    ; Send Serial char. in DL  /Wait 
  10. LSTOUT$     EQU   05    ; Send Parallel char. in DL
  11. CIO$N       EQU   06    ; Display char. in DL. If =FF then CIN$.  No ^C 
  12. CIN$WN      EQU   07    ; Return keyboard char. in AL /Wait, No ^C
  13. CIN$W       EQU   08    ; Return keyboard char. in AL /Wait
  14. PRINT$      EQU   09    ; Display string @DX till terminator
  15. INSTR$      EQU   0A    ; Input keyboard string (DX -> size,cnt,buffer)
  16. KEY?$       EQU   0B    ; Test for keyboard input (AL: FF=yes; 00=no)
  17. CLEAR$KEYB  EQU   0C    ; Clear keyboard buffer (AL = srvc 1,6,7,8,A)
  18. RESET$D     EQU   0D    ; Reset diskette system (default A:)
  19. SELECT$D    EQU   0E    ; Select default drive DL (0=A, 1=B, etc.)
  20. OPEN$       EQU   0F    ; Open  file
  21. CLOSE$      EQU   10    ; Close file
  22. SEARCH$DIR  EQU   11    ; Search for first directory entry
  23. SEARCH$NEXT EQU   12    ; Search for next  directory entry
  24. DELETE$     EQU   13    ; Delete file 
  25. READ$SEQ    EQU   14    ; Read  sequential file
  26. WRITE$SEQ   EQU   15    ; Write sequential file
  27. CREATE$     EQU   16    ; Create file & open
  28. RENAME$     EQU   17    ; Rename file 
  29. DOS$18      EQU   18    ; (DOS internal reserved)
  30. DEF$DRIVE?  EQU   19    ; Return default drive AL (0=A, 1=B, etc.)
  31. SET$DTA     EQU   1A    ; Set Disk Transfer Address to DX
  32. DEF$FAT?    EQU   1B    ; Return Default drive FAT info. (AL,BX,CX,DX)
  33. FAT?$       EQU   1C    ; Get FAT info for drive DL (0=def, 1=A, etc.)
  34. DOS$1D      EQU   1D    ; (DOS internal reserved)
  35. DOS$1E      EQU   1E    ; (DOS internal reserved)
  36. DOS$1F      EQU   1F    ; (DOS internal reserved)
  37. DOS$20      EQU   20    ; (DOS internal reserved)
  38. READ$RND    EQU   21    ; Read random disk record
  39. WRITE$RND   EQU   22    ; Write random disk record
  40. SIZE?$      EQU   23    ; Return file size 
  41. RANDOM$     EQU   24    ; Switch to Random file mode 
  42. SET$INT     EQU   25    ; Set interrupt vector (AL=INT, DS:DX=VECTOR)
  43. BUILD$PS    EQU   26    ; Create new program segment (DX=SEGMENT)
  44. READ$BLOCK  EQU   27    ; Read random block (DX->FCB, CX=COUNT, AL=ERR)
  45. WRITE$BLOCK EQU   28    ; Write random block(DX->FCB, CX=COUNT, AL=ERR)
  46. PARSE$      EQU   29    ; Parse Filespec (SI -> LINE, DI->FCB, AL=CODE)
  47. DATE?$      EQU   2A    ; Return system Date in CX:DX
  48. SET$DATE    EQU   2B    ; Set system Date to CX:DX
  49. TIME?$      EQU   2C    ; Return system Time in CX:DX
  50. SET$TIME    EQU   2D    ; Set system Time to CX:DX
  51. SET$VER     EQU   2E    ; Set write verification to AL (0=off,1=on, DL=0)
  52. ;
  53. ;                       DOS 2.00 Service Codes
  54. ;
  55. DTA?$       EQU   2F    ;Return current DTA in BX
  56. VERSION?$   EQU   30    ;Return DOS Version number (i.e. AL=2, AH=00)
  57. STAY$RES    EQU   31    ;Terminate stay resident (AL=code, DX=size)
  58. DOS$31      EQU   32    ;DOS internal reserved
  59. CTRL$C      EQU   33    ;Get/set ^C checking (AL,DL)
  60. DOS$34      EQU   34    ;DOS internal reserved
  61. INTERRUPT?$ EQU   35    ;Return Interrupt vector AL in ES:BX
  62. FREE$SPACE? EQU   36    ;Return free space for disk DL (0=def, 1=A,...)
  63. DOS$37      EQU   37    ;DOS internal reserved
  64. NATION?$    EQU   38    ;Return country dependent info (DX -> table)
  65. MKDIR$      EQU   39    ;Make sub-directory (DX -> path)
  66. RMDIR$      EQU   3A    ;Remove sub-directory (DX -> path))
  67. CHDIR$      EQU   3B    ;Change directory (DX -> path)
  68. CREATE$PATH EQU   3C    ;Create file (DX -> path)
  69. OPEN$PATH   EQU   3D    ;Open file (DX -> path)
  70. CLOSE$H     EQU   3E    ;Close file (BX=handle)
  71. READ$BYT    EQU   3F    ;Read CX Bytes (BX=handle, DX -> buff)(AX)
  72. WRITE$BYT   EQU   40    ;Write CX Bytes (BX=handle, DX -> buff)(AX)
  73. DELETE$PATH EQU   41    ;Delete file (DX -> path)
  74. LSEEK$      EQU   42    ;Move read/write ptr (AL=code, BX=handle, CX:DX=off)
  75. FILE$ATTR   EQU   43    ;Read/Set file attributes (AL=code,CX=attr,DX -> path)
  76. IOCTL$      EQU   44    ;I/O Control for devices (AL=func, BX=handle)
  77. DUP$HANDLE  EQU   45    ;Duplicate file handle (BX=handle)(AX=new handle)
  78. FORCE$DUP   EQU   46    ;Force duplication(BX=handle, CX=handle 2)
  79. DIRECTORY?$ EQU   47    ;Return current directory of DL (0=def, 1=A)(SI -> buff)
  80. ALLOC$MEM   EQU   48    ;Allocate memory (BX= # par)(AX)
  81. FREE$MEM    EQU   49    ;Free allocated memory (ES=seg)
  82. SET$BLOCK   EQU   4A    ;Modify allocated memory blocks (ES=seg, BX=size)
  83. EXECECUTE$  EQU   4B    ;Execute program (AL=func, DX -> path, BX=parm)
  84. EXIT$2      EQU   4C    ;Terminate process (AL=code)
  85. WAIT$       EQU   4D    ;Retrieve return code of sub=process in AX
  86. FIND$DIR    EQU   4E    ;Find first directory entry (DX->path, CX=ATTR)
  87. FIND$NEXT   EQU   4F    ;find next  directory entry (uses DTA)
  88. DOS$50      EQU   50    ;DOS internal reserved
  89. DOS$51      EQU   51    ;DOS internal reserved
  90. DOS$52      EQU   52    ;DOS internal reserved
  91. DOS$53      EQU   53    ;DOS internal reserved
  92. VERIFY?$    EQU   54    ;Return verification state in AL (0=off, 1=on)
  93. DOS$55      EQU   55    ;DOS internal reserved
  94. RENAME$PATH EQU   56    ;Rename file (DX -> path, DI -> new path)
  95. DATE$TIME   EQU   57    ;Get/Set file date and time in CX:DX (AL=0/1, BX=handle)
  96. ;END TABLE
  97. .RADIX        16
  98. IF1
  99. DOSCALL     MACRO       FUNC,PARM1
  100. .xcref
  101. F_C   =     FUNC
  102. IFNB        <PARM1>
  103. IF F_C EQ 2 OR (F_C GE 4 AND F_C LE 6) OR F_C EQ 0E OR F_C EQ 2E OR F_C EQ 33 OR F_C EQ 36 OR F_C EQ 47
  104.             MOV DL,PARM1
  105. ELSE
  106.             MOV DX,OFFSET PARM1
  107. ENDIF
  108. ENDIF
  109.             MOV AH,FUNC
  110.             INT 21
  111. .cref
  112.             ENDM
  113. ENDIF
  114. .SALL     INT 21
  115. .cref
  116.             ENDM
  117. ENDIF
  118. .SALL     INT 21
  119. .cref
  120.             ENDM
  121. ENDIF
  122. .SALL